//
//  AppDelegate+JCBrightness.m
//  QDMetroClient
//
//  Created by YueWen on 2018/12/28.
//  Copyright © 2018 YueWen. All rights reserved.
//

#import "AppDelegate+JCBrightness.h"
#import "QDTabBarController.h"
#import "JCBrightness.h"
#import "QDMetroCodeTableViewController.h"



@implementation QDMetroAppDelegate (JCBrightness)

- (void)brightnessGraduallyResumeBrightnessWhenWillResignActive {
    [JCBrightness graduallyResumeBrightness];
}

- (void)brightnessGraduallySetBrightnessHighWhenBecomeActive {
    
    //记录当前
    [JCBrightness saveDefaultBrightness];
    
    UINavigationController *visibleViewController = (UINavigationController *)QDTabBarController.sharedInstance.currentViewController;
    
    
    if (![visibleViewController.visibleViewController isKindOfClass:QDMetroCodeTableViewController.class]) {
        return;
    }
    
    /// 调整亮度
    [visibleViewController.visibleViewController viewDidAppear:true];
}



@end
